<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<script>
		let print1 = function (obj) {
			console.log(obj);
		}
		print1(111);

		let print2 = obj => console.log(obj);
		print2(222);

		let sum1 = function (a, b) {
			return a + b;
		}
		console.log(sum1(3,3));

		let sum2 = (a, b) => {
			return a + b;
		}
		console.log(sum2(4,4));

		var sum3 = (a, b) => a + b;
		console.log(sum3(5,5));

		let person = {
			name: 'zhangsan',
			eat1: function (food) {
				console.log(this.name + "在吃" + food);
			},
			eat2: food => console.log(person.name + "在吃" + food),
			eat3(food) {
				console.log(this.name + "在吃" + food);
			}
		}
		person.eat1("包子");
		person.eat2("饺子");
		person.eat3("馄饨");
	</script>
</body>
</html>